{admin title="Manage Modules"}

{if count($modules) gt 0}

{foreach from=$modules item=module key=index}

	<div class="blockHeadline">{$module.general.name}</div>
	<div class="blockCenter">
	<dl>
		<dt>Version</dt>
			<dd>{$module.general.version}</dd>
		<dt>Author</dt>
			<dd>{$module.general.author}</dd>			
		<dt>URL</dt>
			<dd><a href="{$module.general.url}">{$module.general.url}</a></dd>
		<dt>Status</dt>
			<dd>
			{if $module.available}	
			Not installed.			
			{elseif $module.is_enabled eq 1}		
			Active.			
			{elseif $module.is_enabled eq 0}		
			Installed but not enabled.	
			{/if}
			</dd>	
	</dl>
	<p>{$module.general.description}</p>
	<p>
	{if $module.available}	
		<a class="admin-button module-install" href="/module/index/id/{$module.id}/perform/install">Install</a>		
	{elseif $module.is_enabled eq 1}		
		<a class="admin-button module-disable" href="/module/index/id/{$module.id}/perform/disable">Disable</a>
		<a class="admin-button module-uninstall" href="/module/index/id/{$module.id}/perform/uninstall">Uninstall</a>		
	{elseif $module.is_enabled eq 0}		
		<a class="admin-button module-uninstall" href="/module/index/id/{$module.id}/perform/uninstall">Uninstall</a>
		<a class="admin-button module-enable" href="/module/index/id/{$module.id}/perform/enable">Enable</a>
	{/if}
	</p>
	<br class="clearfix"/>
	</div>	
	
{/foreach}
{/if}

{/admin}